-
-
Notifications
You must be signed in to change notification settings - Fork 594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: improve FlagDependencyExportsPlugin for large JSON by depth #8802
base: main
Are you sure you want to change the base?
perf: improve FlagDependencyExportsPlugin for large JSON by depth #8802
Conversation
✅ Deploy Preview for rspack canceled.Built without sensitive environment variables
|
84ce1e2
to
cad432f
Compare
CodSpeed Performance ReportMerging #8802 will not alter performanceComparing Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good to me
@@ -13,13 +13,15 @@ pub struct JsonExportsDependency { | |||
id: DependencyId, | |||
#[cacheable(with=AsPreset)] | |||
data: JsonValue, | |||
exports_depth: f64, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exports_depth: f64, | |
exports_depth: u32, |
u32 should be enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sense.
@@ -32,7 +32,9 @@ mod utils; | |||
|
|||
#[cacheable] | |||
#[derive(Debug)] | |||
struct JsonParserAndGenerator; | |||
struct JsonParserAndGenerator { | |||
pub exports_depth: f64, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pub exports_depth: f64, | |
pub exports_depth: u32, |
D( | ||
module.parser[JSON_MODULE_TYPE], | ||
"exportsDepth", | ||
mode === "development" ? 1 : Number.POSITIVE_INFINITY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mode === "development" ? 1 : Number.POSITIVE_INFINITY | |
mode === "development" ? 1 : Number.MAX_SAFE_INTEGER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is Infinity
in webpack. Should we align?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think both is fine, but I'm not sure what will pass to rust side by napi-rs if we use Infinity here
Summary
Aligned with webpack/webpack#19058.
I will update doc later.
Checklist